package com.kfm.pm;

public class Singleton2 {

    private Singleton2() {}

    public static Singleton2 getInstance() {
        return Singleton2Inner.singleton2;
    }

    // 内部类可以访问外部类的所有东西（方法和属性） 包括private修饰的
    static class Singleton2Inner {
        private static Singleton2 singleton2 = new Singleton2();

    }
}
